.class Lcom/netease/newsreader/view/FloorsView$FloorView;
.super Landroid/widget/FrameLayout;
.source "FloorsView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/view/FloorsView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "FloorView"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/view/FloorsView;


# direct methods
.method public constructor <init>(Lcom/netease/newsreader/view/FloorsView;Landroid/content/Context;Lcom/netease/newsreader/view/FloorsView;)V
    .locals 0
    .parameter
    .parameter "context"
    .parameter "floors"

    .prologue
    .line 152
    iput-object p1, p0, Lcom/netease/newsreader/view/FloorsView$FloorView;->this$0:Lcom/netease/newsreader/view/FloorsView;

    .line 151
    invoke-direct {p0, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    return-void
.end method


# virtual methods
.method protected onMeasure(II)V
    .locals 12
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    const/4 v3, 0x0

    .line 156
    invoke-virtual {p0}, Lcom/netease/newsreader/view/FloorsView$FloorView;->getChildCount()I

    move-result v6

    .line 158
    .local v6, count:I
    const/4 v10, 0x0

    .line 159
    .local v10, maxHeight:I
    const/4 v11, 0x0

    .line 161
    .local v11, maxWidth:I
    const/4 v7, 0x0

    .local v7, i:I
    :goto_0
    if-lt v7, v6, :cond_1

    .line 173
    invoke-virtual {p0}, Lcom/netease/newsreader/view/FloorsView$FloorView;->getSuggestedMinimumHeight()I

    move-result v0

    invoke-static {v10, v0}, Ljava/lang/Math;->max(II)I

    move-result v10

    .line 174
    invoke-virtual {p0}, Lcom/netease/newsreader/view/FloorsView$FloorView;->getSuggestedMinimumWidth()I

    move-result v0

    invoke-static {v11, v0}, Ljava/lang/Math;->max(II)I

    move-result v11

    .line 176
    iget-object v0, p0, Lcom/netease/newsreader/view/FloorsView$FloorView;->this$0:Lcom/netease/newsreader/view/FloorsView;

    invoke-virtual {v0, p0}, Lcom/netease/newsreader/view/FloorsView;->indexOfChild(Landroid/view/View;)I

    move-result v8

    .line 177
    .local v8, index:I
    if-lez v8, :cond_0

    .line 178
    iget-object v0, p0, Lcom/netease/newsreader/view/FloorsView$FloorView;->this$0:Lcom/netease/newsreader/view/FloorsView;

    add-int/lit8 v2, v8, -0x1

    invoke-virtual {v0, v2}, Lcom/netease/newsreader/view/FloorsView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    add-int/2addr v10, v0

    .line 180
    :cond_0
    invoke-virtual {p0, v11, v10}, Lcom/netease/newsreader/view/FloorsView$FloorView;->setMeasuredDimension(II)V

    .line 181
    return-void

    .line 162
    .end local v8           #index:I
    :cond_1
    invoke-virtual {p0, v7}, Lcom/netease/newsreader/view/FloorsView$FloorView;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 163
    .local v1, child:Landroid/view/View;
    invoke-virtual {v1}, Landroid/view/View;->getVisibility()I

    move-result v0

    const/16 v2, 0x8

    if-eq v0, v2, :cond_2

    move-object v0, p0

    move v2, p1

    move v4, p2

    move v5, v3

    .line 164
    invoke-virtual/range {v0 .. v5}, Lcom/netease/newsreader/view/FloorsView$FloorView;->measureChildWithMargins(Landroid/view/View;IIII)V

    .line 165
    invoke-virtual {v1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v9

    check-cast v9, Landroid/widget/FrameLayout$LayoutParams;

    .line 166
    .local v9, lp:Landroid/widget/FrameLayout$LayoutParams;
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredWidth()I

    move-result v0

    iget v2, v9, Landroid/widget/FrameLayout$LayoutParams;->leftMargin:I

    add-int/2addr v0, v2

    .line 167
    iget v2, v9, Landroid/widget/FrameLayout$LayoutParams;->rightMargin:I

    add-int/2addr v0, v2

    .line 166
    invoke-static {v11, v0}, Ljava/lang/Math;->max(II)I

    move-result v11

    .line 168
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    iget v2, v9, Landroid/widget/FrameLayout$LayoutParams;->topMargin:I

    add-int/2addr v0, v2

    .line 169
    iget v2, v9, Landroid/widget/FrameLayout$LayoutParams;->bottomMargin:I

    add-int/2addr v0, v2

    .line 168
    invoke-static {v10, v0}, Ljava/lang/Math;->max(II)I

    move-result v10

    .line 161
    .end local v9           #lp:Landroid/widget/FrameLayout$LayoutParams;
    :cond_2
    add-int/lit8 v7, v7, 0x1

    goto :goto_0
.end method
